package Vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VistaGanador extends javax.swing.JFrame {
	private JPanel jPanel1;
	private JLabel jLabel3;
	private JLabel jLabel4;
	private JLabel jLabel5;
	private JTextField txtnivel;
	private JButton botonsalir;
	private JButton botoncancelar;
	private JButton botonaceptar;
	private JTextField txtnombre;
	private JTextField txttiempo;
	private JTextField txtpuntuacion;
	private JLabel jLabel2;
	private JLabel jLabel1;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				VistaGanador inst = new VistaGanador();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public VistaGanador() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				jPanel1 = new JPanel();
				getContentPane().add(jPanel1, BorderLayout.CENTER);
				jPanel1.setLayout(null);
				{
					jLabel1 = new JLabel();
					jPanel1.add(jLabel1);
					jLabel1.setText("Has Ganado! Enhorabuena");
					jLabel1.setBounds(112, 12, 161, 16);
					jLabel1.setFont(new java.awt.Font("Segoe UI",3,12));
				}
				{
					jLabel2 = new JLabel();
					jPanel1.add(jLabel2);
					jLabel2.setText("Puntacion:");
					jLabel2.setBounds(12, 69, 65, 16);
					jLabel2.setFont(new java.awt.Font("Segoe UI",3,12));
				}
				{
					txtpuntuacion = new JTextField();
					jPanel1.add(txtpuntuacion);
					txtpuntuacion.setBounds(83, 66, 80, 23);
					txtpuntuacion.setEditable(false);
					txtpuntuacion.setOpaque(false);
				}
				{
					jLabel3 = new JLabel();
					jPanel1.add(jLabel3);
					jLabel3.setText("Tiempo:");
					jLabel3.setBounds(181, 69, 53, 16);
					jLabel3.setFont(new java.awt.Font("Segoe UI",3,12));
				}
				{
					txttiempo = new JTextField();
					jPanel1.add(txttiempo);
					txttiempo.setBounds(246, 66, 81, 23);
					txttiempo.setEditable(false);
					txttiempo.setOpaque(false);
				}
				{
					jLabel4 = new JLabel();
					jPanel1.add(jLabel4);
					jLabel4.setText("Nombre:");
					jLabel4.setBounds(193, 117, 60, 16);
					jLabel4.setFont(new java.awt.Font("Segoe UI",3,12));
				}
				{
					txtnombre = new JTextField();
					jPanel1.add(txtnombre);
					txtnombre.setBounds(146, 149, 163, 23);
				}
				{
					botonaceptar = new JButton();
					jPanel1.add(botonaceptar);
					botonaceptar.setText("Aceptar");
					botonaceptar.setBounds(116, 198, 81, 23);
					botonaceptar.setFont(new java.awt.Font("Segoe UI",3,12));
				}
				{
					botoncancelar = new JButton();
					jPanel1.add(botoncancelar);
					botoncancelar.setText("Cancelar");
					botoncancelar.setBounds(205, 198, 79, 23);
					botoncancelar.setFont(new java.awt.Font("Segoe UI",3,12));
				}
				{
					botonsalir = new JButton();
					jPanel1.add(botonsalir);
					botonsalir.setText("Salir");
					botonsalir.setBounds(292, 198, 73, 23);
					botonsalir.setFont(new java.awt.Font("Segoe UI",3,12));
				}
				{
					txtnivel = new JTextField();
					jPanel1.add(txtnivel);
					txtnivel.setBounds(12, 146, 90, 23);
					txtnivel.setEditable(false);
					txtnivel.setOpaque(false);
				}
				{
					jLabel5 = new JLabel();
					jPanel1.add(jLabel5);
					jLabel5.setText("Nivel:");
					jLabel5.setBounds(40, 117, 43, 16);
					jLabel5.setFont(new java.awt.Font("Segoe UI",3,12));
				}
			}
			pack();
			setSize(400, 300);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

	public String getTxtnivel() {
		return txtnivel.getText();
	}

	public void setTxtnivel(String txtnivel) {
		this.txtnivel.setText(txtnivel);
	}

	public String getTxtnombre() {
		return txtnombre.getText();
	}

	public void setTxtnombre(String txtnombre) {
		this.txtnombre.setText(txtnombre);
	}

	public String getTxttiempo() {
		return txttiempo.getText();
	}

	public void setTxttiempo(String txttiempo) {
		this.txttiempo.setText(txttiempo);
	}

	public String getTxtpuntuacion() {
		return txtpuntuacion.getText();
	}

	public void setTxtpuntuacion(String txtpuntuacion) {
		this.txtpuntuacion.setText(txtpuntuacion);
	}

	public void addListener(ActionListener a) {
		
		botonaceptar.addActionListener(a);
		botoncancelar.addActionListener(a);
		botonsalir.addActionListener(a);
		
	}

}
